package com.angus.modules.content.mapper;

import com.angus.modules.content.domain.SysUnit;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface SysUnitMapper extends BaseMapper<SysUnit> {

    /**
     * 查询课程最大集束
     * @param courseCode
     * @return
     */
    @Select("select max(unit_num) from sys_unit where course_code = #{courseCode} AND del_flag = '0'")
    Integer  selectUnitNum(@Param("courseCode") String courseCode);

}
